<?php /* @var $this Controller */?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//FR" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="language" content="fr" />
	
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/connexion.css" />
	
	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>

<div class="container" id="page">

	<div id="header">
		<h1 id="titre">Smith & Jones - HelpDesk</h1>
	</div><!-- header -->

	<div id="mainmenu">
		<?php 
		$this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'Accueil', 'url'=>array('/helpDesk/accueil')),
				array('label'=>'Consulter incidents', 'url'=>array('/billetIncident/index'), 'visible'=>(Yii::app()->user->getState('role') >= 2) ? true : false),
				array('label'=>'Rapporter incidents', 'url'=>array('/billetIncident/create'), 'visible'=>(Yii::app()->user->getState('role') == 2) ? true : false),
				array('label'=>'Traiter incidents', 'url'=>array('/billetIncident/traiter'), 'visible'=>(Yii::app()->user->getState('role') >= 3) ? true : false),
				array('label'=>'Manuel des procédures', 'url'=>array('/procedure/manuel'), 'url'=>array('/procedure/manuel'), 'visible'=>(Yii::app()->user->getState('role') >= 3) ? true : false),
				array('label'=>'Statistiques', 'url'=>array('/parametre/statistiques'), 'visible'=>(Yii::app()->user->getState('role') == 4) ? true : false),
				array('label'=>'Paramètres', 'url'=>array('/parametre/parametres'), 'visible'=>(Yii::app()->user->getState('role') == 4) ? true : false),
				array('label'=>'Se connecter', 'url'=>array('/helpDesk/login'), 'visible'=>(Yii::app()->user->getState('role') == "") ? true : false),
				array('label'=>'Se déconnecter', 'url'=>array('/helpDesk/logout'), 'visible'=>(Yii::app()->user->getState('role') != "") ? true : false),
			),
		)); ?>
	</div><!-- mainmenu -->
	<?php echo $content; ?>

	<div class="clear"></div>
	
	<div id="footer">
		<p>
			By CLAM Studio.
		</p>
	</div><!-- footer -->

</div><!-- page -->

</body>
</html>
